<?php
namespace app\common\model;
use think\Model;

/**
 * 购买服务
 */
class ServiceBuy extends Model {
	protected $insert = ['add_time'];

    protected function setAddTimeAttr(){
        return time();
    }

    /**
     * [getList 购买列表]
     * @param  array   $where [条件]
     * @param  integer $p     [页码]
     * @return [type]         [description]
     */
   /* public function getList($where = [],$p = 1){
        $list = $this->alias('b')
            ->join(['bz_service' => 's'],'s.id = b.foreign_key','left')
            ->join(['bz_user' => 'u'],'u.id = b.buy_user','left')
            ->field('')
            ->limit(($p-1)*config('page_size'),config('page_size'))
            ->select();

        return $list;
    }*/
}
